<?php    
    require_once("../congfig/config.php");

    $pChar=$_GET["pChar"];
    if ($pChar=="") {
        echo "2";
    }
    else{
    $sql="select * from users where username='$pChar'";
    $result=$conn->query($sql);
    $num=$result->num_rows;
    if ($num>0) {
    	echo "1";
    }
    else { 
    	echo "0";
}}
 ?>